home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / docs / ftphelp.lha / FTP-Help.txt
Text File  |  1995-07-30  |  17KB  |  493 lines

  1. Last update: 21-Sep-94
  2.   - New FTP site list (Chapter 3)
  3.   - Downloading large files (Chapter 9)
  4.  
  5. 0. Contents
  6. ===========
  7. 1. Introduction
  8. 2. FTP command list
  9. 3. Important sites
  10. 4. A Sample Session
  11. 5. The .netrc File
  12. 6. Archivers
  13. 7. The Archie Database
  14. 8. Mailservers
  15. 9. Transferring to Amiga
  16.  
  17.  
  18.  
  19. 1. Introduction
  20. ===============
  21.  
  22. FTP stands for File Transfer Protocol.  The program with the same name,
  23. 'ftp', allows you to gain access to some other machines and store and/or
  24. retrieve files.  If you have a UNIX account on a machine with Internet
  25. access, and the machine has the 'ftp' command, you're almost done.  If not,
  26. you have to get the files by mail:  see the section 'Mailservers', below.
  27.  
  28. In this document, we refer to two computers:
  29.  
  30. o    The 'local machine' is the computer that you are physically logged
  31.     in on.
  32.  
  33. o    The 'remote machine' is the computer that you are contacting via
  34.     your local machine.  It might be right next door, or thousands of
  35.     kilometers away!  Using 'ftp', you can transfer files from the
  36.     remote machine to your local machine, or from your local machine to
  37.     the remote machine.
  38.  
  39. Normally, one needs an account on a remote machine to use it.  However, a
  40. number of machines on the Internet allow anybody to log in as the user 'ftp'
  41. or 'anonymous'.  When you log in using the anonymous account, you'll be
  42. prompted for a password.  You should type your local login name as the
  43. password, especially when you upload.  After doing so, you may retrieve all
  44. files found in public areas on the remote machine.  Doing this is
  45. commonly called 'using anonymous ftp' or 'doing some anonymous ftp-ing'.
  46.  
  47. The ftp program gives you a prompt that looks like this:
  48.  
  49.         ftp>
  50.  
  51. At this prompt, you can type commands to connect to remote machines, upload
  52. and download files, etc.
  53.  
  54.  
  55.  
  56. 2. FTP command List
  57. ===================
  58.  
  59. Here are some important commands you'll need within ftp.  In these examples,
  60. any words given inside angled brackets <like this> are like variables
  61. that stand for particular values.  For example, the command
  62.  
  63.             get <remote file name>
  64.  
  65. means you should type the word "get" followed by the name of a file that
  66. is on the remote machine.  An actual example would be:
  67.  
  68.             get SuperProgram.lha
  69.  
  70. Commands For Opening And Closing FTP Connections:
  71.  
  72.     open <site>
  73.  
  74.         Connects to a remote machine.  For valid sites, see below.
  75.  
  76.     close
  77.         Closes connection to the remote site
  78.  
  79.     bye
  80.         Quits FTP.
  81.  
  82.     quit
  83.         Same as bye.
  84.  
  85. Commands For Setting The Transfer Mode
  86.         
  87.     bin
  88.  
  89.         Sets the connection to binary mode for transferring non-text
  90.         files, such as "lha", "lzh", "zoo", "arc", "dms", "zom", "Z"
  91.         (compressed), "gz", "tar", and other archives.  See the
  92.         "Archivers" section below.
  93.  
  94.     asc
  95.         Sets the connection to text (ASCII) mode for transferring
  96.         text files.
  97.  
  98.     It is OK to transfer text files in "bin" mode.  However, it is
  99.     WRONG to transfer binary files in "asc" mode -- they will get all
  100.     messed up.  So to be safe, you can just type "bin" at the beginning
  101.     of each ftp session and leave it that way.  (However, "asc" mode
  102.     is faster for text files.)
  103.  
  104. Commands For Downloading (Getting, Receiving) Files:
  105.  
  106.     get <remote file name>
  107.  
  108.         Receives the named remote file.  This command cannot
  109.         transfer multiple files at a time; for that, see "mget".
  110.  
  111.         If you specify a second argument, it will be used as the
  112.         name for the local file.  (By default, the local file has
  113.         the same name as the remote file.)
  114.  
  115.     mget <remote file 1> <remote file 2> ...
  116.  
  117.         Receives all the above remote files with a single command.
  118.  
  119.     mget <pattern>
  120.  
  121.         Receives all the remote files whose names match <pattern>.
  122.         Patterns may include the symbols
  123.  
  124.             *    stands for any sequence of characters
  125.             ?    stands for any 1 character
  126.  
  127.         For example, if you wanted to download all files that
  128.         begin with "B" and end with ".lzh", type:
  129.  
  130.             mget B*.lzh
  131.  
  132.         To download all files whose names are exactly 4 characters
  133.         long, type:
  134.  
  135.             mget ????
  136.  
  137.         You will be prompted before each file is downloaded.
  138.         To turn off this prompting, see the "prompt" command below.
  139.  
  140. Commands For Uploading (Putting, Sending) Files
  141.  
  142.     put <local file name>
  143.  
  144.         Transmits the local file to the remote machine.
  145.         This works for only one file at a time, similarly to the
  146.         way "get" works.
  147.  
  148.         If you specify a second argument, it will be used as the
  149.         name for the remote file.  (By default, the remote file has
  150.         the same name as the local file.)
  151.  
  152.     mput <local file 1> <local file 2> ...etc.
  153.  
  154.         Transmits all the above local files to the remote machine
  155.         with a single command.
  156.  
  157.     mput <pattern>
  158.  
  159.         Transmits all local files whose names match the given
  160.         pattern.  See the "mget" command, above, for information
  161.         about patterns.
  162.  
  163. Additional Commands For Uploading And Downloading
  164.  
  165.     prompt
  166.  
  167.         Normally, mget and mput will prompt you before transferring
  168.         each file.  If you don't like this, the 'prompt' command
  169.         toggles the prompting on and off.
  170.  
  171.     hash
  172.  
  173.         Normally, files are downloaded silently.  Typing the 'hash'
  174.         command will cause a 'hash mark' to be printed every so
  175.         often, indicating how much downloading has completed so far.
  176.         Typing this command again toggles the hash marks on and off.
  177.  
  178. Commands For Exploring The Local And Remote Machines
  179.  
  180.     Files on the remote machine (and probably your local machine too)
  181.     are organized in directories.  Here is how to navigate those
  182.     directories and view their contents.
  183.  
  184.     dir <pattern>
  185.  
  186.         Lists files in the current directory of the remote machine.
  187.         See "mget", above, for information about patterns.
  188.  
  189.     ls <pattern>
  190.  
  191.         Same as "dir", but list the files in a short format.
  192.  
  193.     cd <directory name>
  194.  
  195.         Changes your current directory on the remote machine.
  196.  
  197.     lcd <directory name>
  198.  
  199.         Changes your current directory on the local machine
  200.  
  201.     mkdir <directory name>
  202.  
  203.         Creates a new directory on the remote machine.  This will
  204.         not work if you do not have permission to do it on the
  205.         remote machine.
  206.  
  207. Some Special And Helpful Functions
  208.  
  209. o    There are some special arguments you can add to the 'get' command.
  210.     If you type:
  211.  
  212.             get myfile -
  213.  
  214.     then file 'myfile' will be displayed on your screen instead of
  215.     downloaded.  If you would like this file to be displayed one
  216.     screen at a time, pausing after each screenful, type
  217.  
  218.             get myfile |more
  219.  
  220.     [NOTE -- NO SPACE BETWEEN THE '|' and 'more'].  This latter command
  221.     may not work on all remote machines.
  222.  
  223. o    Also note that the ls and dir commands take only one argument.  This
  224.     can be either an option or a pattern, BUT NOT BOTH.  If you give a
  225.     second argument, this will be interpreted as a local filename, and
  226.     the directory listing will be stored in that local file instead of
  227.     displayed on your screen.
  228.  
  229.  
  230. 3. Important Sites
  231. ==================
  232.  
  233. Location     Name                     IP Address      Path         Files
  234.                                                                         
  235. USA (MO)     ftp.wustl.edu            128.252.135.4   pub/aminet/    ALL
  236. USA (WI)     ftp.netnet.net           198.70.64.3     pub/aminet/    ALL
  237. Scandinavia  ftp.luth.se              130.240.18.2    pub/aminet/    ALL
  238. Switzerland  ftp.eunet.ch             146.228.10.16   pub/aminet/    ALL
  239. Switzerland  ftp.math.ethz.ch         129.132.104.6   pub/aminet/   1000
  240. Germany      kelly.uni-paderborn.de   131.234.128.206 pub/aminet/    ALL
  241. Germany      ftp.uni-paderborn.de     131.234.2.42    pub/aminet/    ALL
  242. Germany      ftp.uni-stuttgart.de     129.69.18.15    cd  aminet    4000
  243. Germany      ftp.uni-erlangen.de      131.188.3.2     pub/aminet/   7000
  244. Germany      ftp.uni-trier.de         136.199.8.81    pub/aminet/   4500
  245. Germany      ftp.cs.tu-berlin.de      130.149.17.7    pub/aminet/   4000
  246. Germany      ftp.tu-chemnitz.de       192.108.33.193  pub/aminet/   4000
  247. Germany      ftp.fh-augsburg.de       141.82.16.242   pub/aminet/   3000
  248. Germany      ftp.uni-oldenburg.de     134.106.40.9    pub/aminet/   2500
  249. Germany      ftp.uni-bremen.de        134.102.228.2   pub/aminet/   2000
  250. Germany      ftp.uni-kl.de            131.246.9.95    pub/aminet/   1500
  251. Germany      ftp.uni-siegen.de        141.99.128.1    pub/aminet/   1500
  252. Germany      ftp.rz.uni-wuerzburg.de  132.187.1.2     pub/aminet/    700
  253. France       ftp.cnam.fr              163.173.128.15  pub/aminet/   8000
  254. Portugal     ftp.ci.ua.pt             193.136.80.6    pub/aminet/   2000
  255. UK           ftp.doc.ic.ac.uk         155.198.1.40    pub/aminet/    ALL
  256. UK           micros.hensa.ac.uk       148.88.8.84     pub/aminet/   8500
  257.  
  258. The above group of sites together are called 'Aminet'.  They all contain the
  259. same files (through a process called 'mirroring'), although most of them
  260. delete older files.  Also, there are a lot of other Amiga FTP sites around, 
  261. and when make announcments about software on these sites, they usually give 
  262. the site address.
  263.  
  264. Finland      ftp.funet.fi            128.214.6.100   pub/amiga/
  265. USA          ftp.isca.uiowa.edu      128.255.21.233  amiga/fx
  266. USA          ftp.hawaii.edu          128.171.44.70   pub/amiga/fish
  267. Scandinavia  ftp.funet.fi            128.214.248.6   pub/amiga/fish
  268.  
  269. Both ftp.cso.uiuc.edu and grind.isca.uiowa.edu have a full collection of
  270. Fish Disks as their main feature.  Whenever I mention a program that is to
  271. be retrieved from a Fish disk, you can get it there.
  272.  
  273.  
  274.  
  275. 4. A Sample Session
  276. ===================
  277.  
  278. This is an example FTP session.  What you have to type is given in square
  279. brackets, on a line by itself, like this:
  280.  
  281.    [Here is something that you would type]
  282.  
  283. Everything else is displayed by the computer.  FTP output is often preceded
  284. by strange numbers like "220" and "150" -- you can ignore these.
  285. The example begins here.
  286.  
  287.    [ftp]
  288.  
  289. ftp> 
  290.      [open wuarchive.wustl.edu]
  291. Connected to wuarchive.wustl.edu.
  292. 220 amiga FTP server (Version 5.60.97 Wed Dec 9 22:23:21 MET 1992) ready.
  293. Name (amiga:umueller): 
  294.                        [ftp]
  295. 331 Guest login ok, send your userid as password.
  296. Password:
  297.           [kdalton]
  298. 230- Welcome to amiga.physik anonymous FTP server
  299. 230-      .....
  300. 230 Guest login ok, access restrictions apply.
  301. ftp> 
  302.      [cd pub/aminet]
  303. 250 CWD command successful.
  304. ftp> 
  305.      [get RECENT |more]
  306. 200 PORT command successful.
  307. 150 Opening ASCII mode data connection for RECENT (5676 bytes).
  308. | Recent uploads to wuarchive.wustl.edu [130.60.80.80] on 11-Dec-1992
  309. | The last 7 days' uploads, newest first. Blank line=new day, + = long .readme
  310. |
  311. |File                Dir        Size Description
  312. |------------------- ---        ---- -----------
  313. tiff2iff.lha         gfx/conv     7K Converts TIFF files to Amiga IFF
  314. DNetIRCpic.lzh       comm/net    16K Demo picture of DNet IRC
  315. DNetIRC.lha          comm/net    88K+IRC intuition DNet client (dnetlib.o neede
  316. ICoons_Nofp.lzh      gfx/3d     172K+Spline based object modeller (no 68881 nee
  317. 1993.lha             mods/u4ia  109K+ProTracker Module By U4ia called '1993'
  318. skick321.lha         os20/util   37K+Soft-kicker under OS 2.0 - new release
  319. monoxyde.dms         demo/mega  477K+MONOXYDE - new demo by Vanish
  320. baudbandit1.4b.lha   comm/misc   16K+Version 1.4b of baudbandit.device
  321. jed206b.lha          util/edit  144K+programmable, programmers editor. OS2.0+
  322. --More--
  323.          [q]
  324. 226 Transfer complete.
  325. local: |more remote: RECENT
  326. 5763 bytes received in 4.5 seconds (1.2 Kbytes/s)
  327. ftp> 
  328.      [cd game/think]
  329. 250 CWD command successful.
  330. ftp> 
  331.      [bin]
  332. 200 Type set to I.
  333. ftp> 
  334.      [get t-triz.lzh]
  335. 200 PORT command successful.
  336. 150 Opening BINARY mode data connection for t-triz.lzh (56496 bytes).
  337. 226 Transfer complete.
  338. local: t-triz.lzh remote: t-triz.lzh
  339. 56496 bytes received in 0.43 seconds (1.3e+02 Kbytes/s)
  340. ftp> 
  341.      [bye]
  342. 221 Goodbye.
  343.  
  344. This is the end of of the sample session.
  345.  
  346. If you're looking for something specific on that site, check the appropriate
  347. directory (using the 'cd' and 'ls' commands), or download the remote files
  348. 'INDEX', 'LOCAL' or 'ls-lR.Z'.  You can then use a program such as the UNIX
  349. 'grep' to search for filenames in them.  (Type 'man grep' in the UNIX shell
  350. to learn about grep).
  351.  
  352.  
  353. 5. The .netrc File
  354. ==================
  355.  
  356. If you put a file named .netrc in your home directory on the local machine,
  357. it will make your ftp life easier.  Just put into this file all information
  358. about how to log in at your favourite FTP site, and it'll be done
  359. automatically when you ftp to that site.
  360.  
  361. After you create the .netrc file, you have to 'chmod 600 .netrc' or it won't
  362. be accepted:
  363.  
  364.         cd
  365.         chmod 600 .netrc
  366.  
  367. Here's an example .netrc file to log onto the machine wuarchive.wustl.edu.
  368. It also defines a macro called 'init' that turns on binary mode and changes
  369. your remote directory to pub/aminet.  To use this macro after you are logged
  370. into the remote machine, just type
  371.  
  372.         $init
  373.  
  374. machine wuarchive.wustl.edu
  375. login ftp
  376. password kdalton
  377. macdef init
  378. bin
  379. cd pub/aminet
  380.  
  381.  
  382. Make sure you put a blank line after the last command, or else it won't work
  383. properly.  Also, remember to set the password to your login name.
  384.  
  385.  
  386. 6. Archivers
  387. ============
  388.  
  389. Most files on FTP sites store their files in archived (compressed) format.
  390. You can recognize the archiver used by the ending of the file name.  These
  391. are the most important ones:
  392.  
  393. Suffix  Archiver        Filename on Aminet
  394.  
  395. .lzh    LhA             LhA_e138.run
  396. .lha    LhA             LhA_e138.run
  397. .zoo    Zoo             zoo2-10.lzh
  398. .zip    Zip             unzip-4.1.lzh
  399. .dms    DMS             dms111.sfx
  400. .run    (LhA)           -
  401. .sfx    (LhA)           -
  402. .tar.Z  tar, compress   tar-compress.lzh
  403. .gz    GNU Zip        gzip124x.lha
  404.  
  405. The AmigaDOS versions of those archivers can be found on the AmiNet sites
  406. (see above) in the directory pub/aminet/util/arc, except for GNU Zip which
  407. is found in pub/aminet/util/pack.  To give you a start, LhA is also stored
  408. in self-extracting form (.run or .sfx).  Just execute it to extract it.
  409.  
  410. UNIX versions of most of these archivers are available.  You can get them
  411. from wuarchive.wustl.edu in the directory /pub/aminet/misc/unix/, or if
  412. they're not there, use archie (see below) to find them. The files names are:
  413.  
  414. LhA  lha-1.00.tar.Z  
  415. Zoo  zoo-2.10.tar.Z
  416. Zip  unzip41.tar.Z
  417. Dms  dmscheck.c.Z
  418.  
  419.  
  420. 7. The Archie Database
  421. ======================
  422.  
  423. There is a database of all files on all FTP sites worldwide, called 'archie'.
  424. They have a mailserver, a telnet service, and a client software.  Telnet to
  425. archie.sura.net and log in as 'archie', or send mail containing HELP in its
  426. body to archie@quiche.cs.mcgill.ca.  You'll get more information that way.
  427.  
  428.  
  429. 8. Mailservers
  430. ==============
  431.  
  432. Some sites allow sending them magic mail messages which cause them to FTP
  433. things from other sites, uuencode them, and send them to you.  Others only
  434. send the files stored locally at that site.  Here are the most important mail
  435. servers.  Send a mail containing HELP in its body to find out more about them
  436. (note that the German links are slow, generally):
  437.  
  438. ftpmail@decwrl.dec.com
  439. mailserver@nic.funet.fi
  440. ftp-mailer@ftp.informatik.tu-muenchen.de
  441. mrcserv@janus.mtroyal.ab.ca
  442. mail-server@ftp.cs.tu-berlin.de
  443. mail-server@rtfm.mit.edu
  444.  
  445.  
  446. 9. Transferring to Amiga
  447. ========================
  448.  
  449. After you have the files on your UNIX account, you need to get the files
  450. home.  Most Amiga terminal programs have one or more ways to transfer files
  451. to your Amiga.  Read your terminal program documentation for more
  452. information.
  453.  
  454. One recommended method is to use ZModem.  If your local machine has the
  455. 'sz' command, and your terminal program supports ZModem, you are set.
  456. To download the file 'whatever.lzh' to your Amiga, type:
  457.  
  458.         sz whatever.lzh
  459.  
  460. and then use your terminal program to receive it.  If your site does not
  461. have 'sz', you can get it from krynn.efd.lth.se in the file
  462. /pub/modem/rzsz9107.tar.Z.  Compile it, or use archie to find a version
  463. specific for your UNIX flavor.
  464.  
  465. In the worst case, you can turn on your terminal program's "screen capture"
  466. feature and type:
  467.  
  468.     uuencode <filename filename
  469.  
  470. to get your file typed to the screen in 'uuencoded' format.  On your Amiga,
  471. uudecode the file (using uudecode from Fish Disk 92).  Also, some sites
  472. still use 'kermit'. If you have a program of that name, you can use one of
  473. the Amiga kermit implementations found on Aminet to get files home.
  474.  
  475. If you don't have a modem, you can try to find a workstation with 3.5"
  476. floppy drive.  Sun 4 computers have them.  There you can either use the
  477. program mtools (try 'man mcopy') to store the files in MSDOS format and
  478. retrieve them using MSH (Fish Disk 382) or CrossDOS (included with AmigaDOS
  479. 2.1 and higher), or you use gnu tar (UNIX version to be found on
  480. decuac.dec.com, /pub/binaries/gnutar-1.10.tar.Z) to store files on the disk
  481. in .tar format using the command 'gtar cfvM /dev/rfd0c'.  Then you restore
  482. the files with gnu gtar (found on wuarchive.wustl.edu, in the file
  483. pub/aminet/util/gnu/gtar110.lzh) and the FLAT device (Fish Disk 535) and MSH
  484. (or any other PC format reading tool).  Mount FLAT:, and then enter 'gtar
  485. xfvM flat:MSH' or replace the MSH by the name of your emulation tools.
  486.  
  487. If a file is too large to fit on a floppy, you can use misc/unix/bsplit*
  488. from Aminet to split it, and c:join under AmigaDOS to put it back together.
  489.  
  490. If you'd like some additional info to be included in this FAQ, contact
  491. umueller@wuarchive.wustl.edu.  -Urban Dominik Mueller
  492.  
  493.